-
-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update drop drown for logged in desktop (library) #2021
Update drop drown for logged in desktop (library) #2021
Conversation
… icon instead of link
static/js/Header.jsx
Outdated
<DropdownMenuItemWithIcon icon={'/static/icons/library_icon.svg'} textEn={'Library'} textHe={'ספריה'} /> | ||
</DropdownMenuItem> | ||
<DropdownMenuSeparator /> | ||
<DropdownMenuItem url={'//sheets.sefaria.org'}> | ||
<DropdownMenuItem url={'//sheets.sefaria.org'} newTab={true}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are these double slashes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make the URL not relative (i.e. route to sheets.sefaria.org
vs localhost:8000/sheets.sefaria.org
). It's a bit hacky, is there a better way to do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be /sheets
, confirm with SK.
static/icons/logged_out.svg
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this icon in this PR if the PR is for logged in menu?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mistake, taking out. Thanks for catching :)
static/js/Header.jsx
Outdated
<DropdownMenuItemWithIcon icon={'/static/icons/sheets_icon.svg'} textEn={'Sheets'} textHe={'דפים'}/> | ||
</DropdownMenuItem> | ||
<DropdownMenuSeparator /> | ||
<DropdownMenuItem url={'//developers.sefaria.org'}> | ||
<DropdownMenuItem url={'//developers.sefaria.org'} newTab={true}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switch to full URL
…s of logged-out dropdown, clean up urls
Description
Updating the user drop down for library logged-in view.
Code Changes
static/css/s2.css
- CSS shifts to get everything working, tested to make sure it doesn't break anything. Commenting out the chevron dropdown (see note below)static/icons/logged_out.svg
- The icon for logged out users.static/js/Header.jsx
- The new logged in dropdown component (<LoggedInDropdown />
), rendering it. Fixes also to the module switcher to jive with the adjustment to<DropdownMenu />
static/js/common/DropdownMenu.jsx
- Adjusting the dropdown menu component to flexibly allow opening in new tabs vs same window, and accepting an icon component instead of a url for more flexibility.Notes
<DropdownMenu />
component, accepting the icon image (from which the dropdown 'hangs') as a component instead of a url string. This allows for greater flexibility when rendering components like the initials icon. We will need to likely shift some small pieces in other PRs for everything to merge seamlessly, but it should be fairly easy.